package 状态模式;

/**
 * @author zzs
 * @ClassName NoQuantity.java
 * @Description
 * @createTime 2022年05月18日 20:31:00
 */
public class NoQuantity implements Status{
    public Sweet sweet;

    public NoQuantity(Sweet sweet) {
        this.sweet = sweet;
    }

    @Override
    public void put() {
        System.out.println("投钱");
        Sweet.status = sweet.getHaveQuantity();
    }

    @Override
    public void turn() {
        System.out.println("没钱转不了");
    }

    @Override
    public void refund() {
        System.out.println("没钱退不了");
    }

    @Override
    public void pop() {
        System.out.println("没钱出不了");
    }
}
